home *** CD-ROM | disk | FTP | other *** search
- | "InitFile" - Public Domain by D.Potter 26/6/90
- | Allows keyboard emulated loading by double-clicking on a data file
- | in the RiscOS desktop.
- | Intended in this version for Logistix, but the principal will work for
- | other programs which do not clear the keyboard buffer at startup.
- | This is an Obey File. ( Exec files do not allow passing of system
- | parameters.) To pass actual commands to Logistix, (or any similar
- | application), an Exec file must be used.
- | The Exec file is built by this file, including the full path for the
- | startup file that was clicked on.
- | The !Boot file for app. must be an Obey file containing the commands -
- | Set Logi$Dir <Obey$Dir>
- | Set Alias$@RunType_xxx Obey <Logi$Dir>.InitFile %%*0
- | (As well as any other commands already there)
- | Where xxx is the filetype for the data file (DFF for Logistix).
- | Logi$Dir will be the directory where the application resides, and
- | is automatically set up when the application's !Boot is first seen.
- | Note : the | characters at the start of the above lines should NOT be
- | in the !Boot file!
- |
- | ----------------- The Program ----------------------------
- |
- | Put the pathname information in temporary system variable Lload$
- Set Lload$ %*0
- | Clear extraneous data which appears when a file is written to at this
- | stage by dummy spooling. - This data is not needed here anymore!
- Spool <Logi$Dir>.!LoadFile
- Echo <Lload$>
- spool
- | Now create the actual Exec file which will run LGX and issue the commands.
- Spool <Logi$Dir>.!LoadFile
- Echo || !LoadFile - Transient program built by InitFile (PD) by D.Potter 1990
- Echo *Run <Logi$Dir>.!Run
- |
- | Send the Logistix load sequence - Note : NO SPACES in the sequence!
- | /L = load, L= Logistix data file, <Lload$>= Full filename,
- | A= All to be loaded (You might want to use a different load sequence)
- |
- | (Where a return is required such as after the filename here,
- | simply start a new Echo statement for the next command.)
- |
- Echo /LL<Lload$>
- Echo A
- |
- | Close the file
- Spool
- |
- | Set it's file type
- SetType <Logi$Dir>.!LoadFile Command
- |
- | Lose the temporary system variable
- UnSet Lload$
- |
- | And run the file just created!
- Exec <Logi$Dir>.!LoadFile
-